import React,{Component} from 'react';
import {
  Link
} from 'react-router-dom';
import './addressCard.scss';
export default class AddressCard extends Component{
	constructor(props){
    super(props)
    this.state = {
    }
  }
	render(){
		return(
			<div className="addressCard">
				<div className="xinxi">
					<span>收件人：{this.props.addressList.user_address_contact}</span>
					<span>{this.props.addressList.user_address_phone}</span>
					<p>收货地址：{this.props.addressList.user_address_area+this.props.addressList.user_address_address}</p>
				</div>
				<div className="gn">
				{
					this.props.addressList.user_address_default===1 ?
					<div className="moren">
						<span className="glyphicon glyphicon-checked"></span><p>默认地址</p>
					</div>
					: ''
				}
					<p onClick={this.props.click.bind(this,this.props.addressList.user_address_id)}>
						<span className="glyphicon glyphicon-delete1"></span>删除
					</p>
					<Link to={
						{
							pathname: '/user/shipAddress/editAddress',
							state: {id: this.props.addressList.user_address_id}
						}
					}>
						<p>
							<span className="glyphicon glyphicon-edit"></span>编辑
						</p>
					</Link>
				</div>
			</div>
		)
	}
}